"""
URL configuration for BugManagementSystem project.

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/4.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from Users import views as userViews
from Bugs import views as bugViews
from Cases import views as caseViews

urlpatterns = [
    # 用户管理url
    # path("admin/", admin.site.urls),
    path('', userViews.login),
    path('login', userViews.login),
    path('user/list/', userViews.user_list),
    path('user/add/', userViews.user_add),
    path('user/delete/', userViews.user_delete),
    path('user/<int:nid>/edit/', userViews.user_edit),

    # 缺陷管理url
    path('bug/list/', bugViews.bug_list),
    path('bug/add/', bugViews.bug_add),
    path('bug/delete/', bugViews.bug_delete),
    path('bug/<int:nid>/edit/', bugViews.bug_edit),

    # 用例管理url
    path('case/list/', caseViews.case_list),
    path('case/add/', caseViews.case_add),
    path('case/delete/', caseViews.case_delete),
    path('case/<int:nid>/edit/', caseViews.case_edit),
]
